package cn.jbit.easybuy.service.impl;

import java.util.List;

import cn.jbit.easybuy.dao.ProductDao;
import cn.jbit.easybuy.dao.impl.ProductDaoImpl;
import cn.jbit.easybuy.entity.Page;
import cn.jbit.easybuy.entity.Product;
import cn.jbit.easybuy.service.ProductService;

public class ProductServiceImpl implements ProductService {

	@Override
	public Page findAll(int pageNo, int pageSize) {
		ProductDao dao = new ProductDaoImpl();
		Page page = dao.findAll(pageNo, pageSize);
		return page;
	}

	@Override
	public Page findByCategory(int pageNo, int pageSize, long categoryId) {
		ProductDao dao = new ProductDaoImpl();
		Page page = dao.findByCategory(pageNo, pageSize, categoryId);
		return page;
	}

}
